package com.zhouyu.controller;

import com.zhouyu.pojo.User;
import com.zhouyu.service.ZhouyuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

@RestController
public class ZhouyuController {

	@Autowired
	private ZhouyuService zhouyuService;

	@PostMapping("/test")
	public String test(MultipartFile file, /*只拿表单的*/@RequestPart String name) {
		System.out.println(name);
		System.out.println(file.getSize());
		return zhouyuService.test();
	}

	@RequestMapping("getUser")
	public User getUser(){
		return new User("abc");
	}

	@RequestMapping("getString")
	public String getString(){
		return "hahahah";
	}
}
